import http from './request'
// import request from './request_bak.js'
import {
	ACCESS_TOKEN_KEY
} from "@/common/const/index.js";


let apiList = {
	
	// 登录接口
	login: (data) => {
		return http.post("/oauth/gam/v2.0/access_token", data, {
			header: {
				'Content-Type': 'application/x-www-form-urlencoded'
			}
		});
	},
	
	// 获取登录用户信息
	getUserinfo: (data) => {
		return http.get("/oauth/gam/v2.0/userinfo", data, {
			header: {}
		});
	},
	
	/**
	 * 检查APP是否有新版本
	 */
	/* checkNewVersion: (data) => {
		return http.post("/uapws/rest/platform/update", data, {
			header: {
				'Content-Type': 'application/json'
			}
		})
	}, */
	
	// 查询问题
	queryProblemList: (data) => {
		return http.post("/api/problem/List", data, {
			header: {
				'Content-Type': 'application/json'
			}
		})
	},
	// 查询问题详情
	queryProblemById: (data) => {
		return http.post("/api/problem/queryById", data, {
			header: {
				'Content-Type': 'application/json'
			}
		})
	},
	// 随手拍填报
	insertProblem: (data) => {
		return http.post("/api/problem/insert", data, {
			header: {
				'Content-Type': 'application/json'
			}
		})
	},
	// 随手拍筛选
	filterProblem: (data) => {
		return http.post("/api/problem/filterProblem", data, {
			header: {
				'Content-Type': 'application/json'
			}
		})
	},
	// 随手拍处理
	handlerProblem: (data) => {
		return http.post("/api/problem/handlerProblem", data, {
			header: {
				'Content-Type': 'application/json'
			}
		})
	},
	// 随手拍验收
	checkProblem: (data) => {
		return http.post("/api/problem/checkProblem", data, {
			header: {
				'Content-Type': 'application/json'
			}
		})
	},
	// 获取协同部门负责人
	queryFilterByDeptId: (data) => {
		return http.post("/api/problem/queryFilterByDeptId", data, {
			header: {
				'Content-Type': 'application/json'
			}
		})
	},
	// 获取职能检查部门负责人
	queryZnscFilter: (data) => {
		return http.post("/api/problem/queryZnscFilter", data, {
			header: {
				'Content-Type': 'application/json'
			}
		})
	},
	// 获取js api ticket
	getJsApiTicket: (data) => {
		return http.post("/api/problem/getJsApiTicket", data, {
			header: {
				'Content-Type': 'application/json'
			}
		})
	},
	// 获取agent api ticket
	getAgentTicket: (data) => {
		return http.post("/api/problem/getAgentTicket", data, {
			header: {
				'Content-Type': 'application/json'
			}
		})
	},
	// 随手拍审核信息查询
	queryProblemApprList: (data) => {
		return http.post("/api/problemApprove/List", data, {
			header: {
				'Content-Type': 'application/json'
			}
		})
	},
	// 随手拍审核信息全流程查询
	queryProblemApproveFlow: (data) => {
		return http.post("/api/problemApprove/queryProblemApproveFlow", data, {
			header: {
				'Content-Type': 'application/json'
			}
		})
	},
	// 随手拍审核信息数量查询
	queryTaskTodoMsgNum: (data) => {
		return http.post("/api/problemApprove/queryTaskTodoMsgNum", data, {
			header: {
				'Content-Type': 'application/json'
			}
		})
	},
	// 流程收回
	unCommit: (data) => {
		return http.post("/api/problemApprove/unCommitProblemApprFlow", data, {
			header: {
				'Content-Type': 'application/json'
			}
		})
	},
	
	// 组织查询
	queryOrgs: (data) => {
		return http.post("/api/orgs/List", data, {
			header: {
				'Content-Type': 'application/json'
			}
		})
	},
	// 部门查询
	queryDepts: (data) => {
		return http.post("/api/dept/List", data, {
			header: {
				'Content-Type': 'application/json'
			}
		})
	},
	// 人员查询
	queryPsndoc: (data) => {
		return http.post("/api/psndoc/List", data, {
			header: {
				'Content-Type': 'application/json'
			}
		})
	},
	// 基础档案统一查询
	queryBasedocList: (data) => {
		return http.post("/api/gfqcMob/GetBasedocList", data, {
			header: {
				'Content-Type': 'application/json'
			}
		})
	},
	// 定岗定编查询
	queryFixedPostStaff: (data) => {
		return http.post("/api/fixedPostStaff/List", data, {
			header: {
				'Content-Type': 'application/json'
			}
		})
	},
	
	// 用户查询
	queryUser: (data) => {
		return http.post("/api/user/List", data, {
			header: {
				'Content-Type': 'application/json'
			}
		})
	},
	// 附件上传业务接口
	fileUpload: (data) => {
		return http.post("/api/problem/FileUpload", data, {
			header: {
				'Content-Type': 'application/json'
			}
		})
	},
	// 附件下载接口，暂时弃用
	fileDownload: (data) => {
		return http.post("/gfadmin.hr.fsapi", data, {
			header: {
				'Content-Type': 'application/json'
			}
		})
	}
}

export default apiList